# Maintainer: Marian Buschsieweke <marian.buschsieweke@posteo.net>
pkgname=prjtrellis
pkgver=1.4
pkgrel=2
pkgdesc="Documentation of the Lattice ECP5 bit-stream format"
url="https://github.com/YosysHQ/prjtrellis"
arch="all"
license="ISC AND MIT"
makedepends="
	cmake
	ninja
	python3
	python3-dev
	boost-dev
	"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/YosysHQ/prjtrellis/archive/refs/tags/$pkgver.tar.gz

	0001-library-install-path.patch
	"
options="!check" # no unit tests provided

build() {
	cmake -B build -G Ninja -S libtrellis \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCURRENT_GIT_VERSION=$pkgver \
		#
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
3fd8bf533da98f3cdf6a0fe92ee4b2cb5d58fcc568e3365a1927fae392a4aaeec80b1f53e26ccd6c7afd7efb17b749cd8bac6d3ec2d17f9ad2c33da592a213d9  prjtrellis-1.4.tar.gz
f6cee3e14a05a5ad8845f11ad3b6102cdbacb43b906eaa3f3892b7418193a4652bf3ff1a3ce42496a39adeecea5fe55bf32a470cf7b3a23b653e052b22c68a3f  0001-library-install-path.patch
"
